package cn.tedu.boyou.acticle.service.impl;

import cn.tedu.boyou.acticle.domain.Route;
import cn.tedu.boyou.acticle.mapper.RouteMapper;
import cn.tedu.boyou.acticle.service.IRouteService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class RouteServiceImpl implements IRouteService{

    @Autowired
    private RouteMapper routeMapper;

    @Override
    public void insert(Route sale) {
        routeMapper.insert(sale);
        throw new RuntimeException("插入还需要一些数据的。");
    }

    @Override
    public List<Route> listAll() {
        return routeMapper.selectAll();
    }

    @Override
    public Route getByPrimaryKey(Long id) {
        return routeMapper.selectByPrimaryKey(id);
    }
}
